package com.aliang.shopping.model.po;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品sku表
 * @TableName goods_sku
 */
@TableName(value ="goods_sku")
@Data
public class GoodsSku implements Serializable {
    /**
     * 数据Id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商品规格集合
     */
    @TableField(value = "spec_list")
    private String specList;

    /**
     * 商品图片
     */
    @TableField(value = "image")
    private String image;

    /**
     * 商品价格
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 商品折扣
     */
    @TableField(value = "scope")
    private BigDecimal scope;

    /**
     * 库存
     */
    @TableField(value = "store")
    private Integer store;

    /**
     * 预存库存
     */
    @TableField(value = "reserved_store")
    private Integer reservedStore;

    /**
     * 是否售卖，默认0
     */
    @TableField(value = "is_sell")
    private Integer isSell;
    /**
     * 商品Id
     */
    @TableField(value = "goods_id")
    private Long goodsId;
    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    /**
     * 是否删除
     */
    @TableField(value = "is_delete")
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}